<template>
  <a-config-provider :locale="locale">
    <router-view />
    <global-setting />
  </a-config-provider>
</template>

<script lang="ts" setup>
  import { computed } from 'vue';
  import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
  import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
  import GlobalSetting from '@/components/global-setting/index.vue';
  import useLocale from '@/hooks/locale';

  const { currentLocale } = useLocale();
  const locale = computed(() => {
    switch (currentLocale.value) {
      case 'zh-CN':
        return zhCN;
      case 'en-US':
        return enUS;
      default:
        return enUS;
    }
  });
  // console.log('all lang: ', getLangModules());

  // 多语言配置
</script>

<style>
  /* 设置滚动条的样式 */
  ::-webkit-scrollbar {
    width: 7px;
  }
  /* 滚动槽 */
  ::-webkit-scrollbar-track {
    -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.2);
    border-radius: 5px;
  }
  /* 滚动条滑块 */
  ::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background: rgba(100, 100, 100, 0.2);
    -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.2);
  }
  body {
    padding: 0px !important;
    margin: 0px !important;
    /*font-family: Microsoft YaHei;*/
  }
  html {
    padding: 0px !important;
    margin: 0px !important;
  }
</style>
